<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>伪元素选择器使用场景</title>
  <style>
    @font-face {
      font-family: 'icomoon';
      src:  url('fonts/icomoon.eot?btfzvu');
      src:  url('fonts/icomoon.eot?btfzvu#iefix') format('embedded-opentype'),
      url('fonts/icomoon.ttf?btfzvu') format('truetype'),
      url('fonts/icomoon.woff?btfzvu') format('woff'),
      url('fonts/icomoon.svg?btfzvu#icomoon') format('svg');
      font-weight: normal;
      font-style: normal;
      font-display: block;
    }
    .v1 {
      position: relative;
      margin-bottom: 20px;
      width: 200px;
      height: 35px;
      border: 1px solid slateblue;
    }
    .v1::after {
      position: absolute;
      top: 10px;
      right: 10px;
      font-family: 'icomoon';
      /*content: '';*/
      content: '\ea36';
      color: pink;
      font-size: 18px;
    }

    div[class^="v2"] {
      position: relative;
      width: 940px;
      height: 642px;
      margin: 0 auto;
    }
    div[class^="v2"] img{
      width: 100%;
      height: 100%;
    }
    div[class^="v2"]::before {
      content: '';
      display: none;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0,0,0, .5) url("./img/player.png") no-repeat center;
    }
    div[class^="v2"]:hover::before {
      display: block;
      cursor: pointer;
    }
  </style>
</head>
<body>
  <div class="v1"></div>
  <div class="v2-1">
    <img src="img/bd.jpg" alt="">
  </div>

  <div class="v2-2">
    <img src="img/bd.jpg" alt="">
  </div>
</body>
</html>